home *** CD-ROM | disk | FTP | other *** search
/ MacHack 2000 / MacHack 2000.toast / pc / The Hacks / Softshoe / Lisa's Mac Parts / Printing / PrintJob.cp < prev    next >
Text File  |  2000-06-23  |  866b  |  36 lines

  1. // PrintJob.cp
  2.  
  3. #ifndef PrintJob_h
  4. #include "PrintJob.h"
  5. #endif
  6. #ifndef PrintingError_h
  7. #include "PrintingError.h"
  8. #endif
  9. #ifndef PrintManager_h
  10. #include "PrintManager.h"
  11. #endif
  12. #ifndef PageSetupInfo_h
  13. #include "PageSetupInfo.h"
  14. #endif
  15. #ifndef PrintJobInfo_h
  16. #include "PrintJobInfo.h"
  17. #endif
  18.  
  19. PrintJob::PrintJob( const PrintManager& manager,
  20.                           const PageSetupInfo& pageSetup,
  21.                           const PrintJobInfo& jobInfo )
  22.   {
  23.     *printHandle = pageSetup;
  24.     *manager.printHandle = jobInfo;
  25.     PrJobMerge( manager.printHandle, printHandle );
  26.     ThrowPrintingError( PrError() );
  27.     
  28.     // Extract the page range from the print record,
  29.     // replacing it with the maximum range -- we'll
  30.     // do our own page selection.
  31.         firstPage = printHandle->prJob.iFstPage;
  32.         lastPage =  printHandle->prJob.iLstPage;
  33.         printHandle->prJob.iFstPage = 1;
  34.         printHandle->prJob.iLstPage = iPrPgMax;
  35.   }
  36.